#include <iostream>
using namespace std;
int main(){
    int N,step=0;
    cin>>N;
    while(N!=1){
        if(N%2==0){
            N=N/2;
        }else{
            N=(N*3+1)/2;
        }
        step++;
    }
    cout<<step;
	return 0;
}
